package com.irun.cm;


import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

/***
 * @author wushengxiong
 * @date 2012-5-22
 * @email a610959773@gmail.com
 * @desc 
 */
public class PhoneManagerActivity extends TabActivity{
	
	public TabHost th;
	
	public static final String CALL_CALL = "CALL_CALL";
	public static final String CALL_SMS = "CALL_SMS";
	public static final String CALL_CONTACT = "CALL_CONTACT";
	public static final String CALL_CELLOCTION = "CALL_CELLOCTION";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.phone_manager);
		
		th = this.getTabHost();
		
		TabSpec mCall = th.newTabSpec(CALL_CALL);
		mCall.setIndicator(CALL_CALL);
		mCall.setContent(new Intent(this, CallActivity.class));
		th.addTab(mCall);
		
		RadioGroup mRadioGroup = (RadioGroup)findViewById(R.id.mRadioGroup);
		RadioButton mButton01 = (RadioButton)findViewById(R.id.radio_call);
		mButton01.setId(0);
		RadioButton mButton02 = (RadioButton)findViewById(R.id.radio_sms);
		mButton02.setId(1);
		RadioButton mButton03 = (RadioButton)findViewById(R.id.radio_contact);
		mButton03.setId(2);
		RadioButton mButton04 = (RadioButton)findViewById(R.id.radio_celloction);
		mButton04.setId(3);
		
		th.setCurrentTab(0);
		mRadioGroup.check(0);
	}
	
	
	
}
